package com.yuyang.wifi.utils.eventbus;

import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

/**
 * Created by zhuyuli on 2017/8/3.
 */

public interface BaseEventObserver {

    //创建BaseEvent, BaseEvent进行接收消息
    @Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
    public void onMessageEventMain(BaseEvent baseEvent);

    @Subscribe(threadMode = ThreadMode.POSTING, priority = 2, sticky = true)
    public void onMessageEventPost(BaseEvent baseEvent);

    @Subscribe(threadMode = ThreadMode.BACKGROUND, priority = 3)
    public void onMessageEventBackground(BaseEvent baseEvent);


    @Subscribe(threadMode = ThreadMode.ASYNC, priority = 4) // 不能在这里执行更新ui的操作
    public void onMessageEventAsync(BaseEvent baseEvent);
}
